package groep3.ssc.skaterViews;

import groep3.ssc.controllers.ViewController;
import groep3.ssc.model.Race;
import android.content.Context;
import android.view.Gravity;
import android.widget.ArrayAdapter;
import android.widget.LinearLayout;

public abstract class SkaterViewTemplate extends LinearLayout
{

    protected ViewController controller;
    public boolean hasSettings;

    public SkaterViewTemplate(Context context)
    {
        super(context);
        this.setGravity(Gravity.CENTER);
        this.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
    }

    public void subscribeToController()
    {
        controller = ViewController.getInstance();
        controller.addSkaterView(this);
    }

    public abstract void update(Race model);

    public ArrayAdapter<Object> getSettingsAdapter(Context context)
    {
        return null;
    }

    public Object getSettingsSelectedItem()
    {
        return null;
    }

    public abstract String toString();
}
